PDFs file can be uploaded in Trilium, where they will be displayed without the need to download them first.
Since v0.102.0, PDFs will be rendered using Trilium's built-in PDF viewer, which is a customization of Mozilla's PDF.js viewer (also built-in in the Mozilla Firefox browser). Versions prior to that render PDFs using the browser's default PDF viewer.
For every PDF, Trilium will remember the following information:
This makes it useful when reading large documents since the position is remembered automatically. This happens in the background, however it's recorded only a few seconds after stopping any scroll actions.
Since v0.102.0 it's possible to annotate PDFs. To do so, look for the
annotation buttons on the right side of the PDF toolbar (
).
The following annotation methods are supported:
Although annotations are stored in the PDF itself, they can be edited. To edit an annotation, press one of the annotation buttons from the previous section to enter edit mode and click on an existing annotation. This will reveal a toolbar with options to customize the annotation (e.g. to change a color), as well as the possibility to remove it.
Annotations are stored directly in the PDF. When modifications are made, Trilium will replace the PDF with the new one.
Since modifications are automatically saved, there's no need to manually save the document after making modifications to the annotations.
The benefit of “baked-in annotations” is that they are also accessible if downloading (for external use outside Trilium) or sharing the note.
The downside is that the entire PDF needs to be sent back to the server, which can slow down performance for larger documents. If you encounter any issues from this system, feel free to report it.
Similar to annotations, forms are also supported by Trilium since v0.102.0. If the document has fields that can be filled-in, they will be indicated with a colored background.
Simply type text in the forms and they will be automatically saved.
When a PDF file is opened in Trilium the Right Sidebar is augmented with PDF-specific navigation, with the following features:
PDFs can also be shared using the Sharing feature. This will also use Trilium's customized PDF viewer.
If you are using a reverse proxy on your server with strict access limitations
for the share functionality, make sure that [host].com/pdfjs directory
is accessible. Note that this directory is outside the /share route
as it's common with the rest of the application.